package com.likersai.opon.constant;

/**
 * 报错信息枚举
 *
 * @author sun.ye
 * @since 2021-02-25 23:40
 */
public enum ExceptionMsg  implements MsgAndCode {

    /**
     * 报错信息枚举
     */
    NOT_LOGIN("NOT_LOGIN","未登录","没有登录"),
    NO_USER("NO_USER","无此用户","数据库中未查询到此用户"),
    
    
    SQL_NO_WHERE("SQL_NO_WHERE","缺少WHERE条件","禁止对全表进行此类操作"),

    WORST("WORST","最坏的","最坏的异常是什么呢");

    private final String code;
    private final String name;
    private final String message;

    ExceptionMsg(String code, String name, String message) {
        this.code = code;
        this.name = name;
        this.message = message;
    }

    @Override
    public String getName() {
        return name;
    }

    @Override
    public String getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }
}